﻿using SpeakToMe.Core.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SpeakToMe.Core
{
    //Wraps a callback that can be passed in a request to process a command
    public class CallbackWrapper : ISmartHomeServiceCallback
    {
        public CallbackWrapper(Action<string> call)
        {
            ProcessAnswer = call;
        }
        public void ReturnResult(string result)
        {
            ProcessAnswer.Invoke(result);
        }

        public Action<string> ProcessAnswer
        {
            get;
            set;
        }
    }
}
